home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / dev / gui / BGUI11c.lha / docs / listviewclass.doc < prev    next >
Text File  |  1995-04-23  |  30KB  |  757 lines

  1.  
  2.                File: listviewclass.doc
  3.         Description: Listviewclass documentation.
  4.           Copyright: (C) Copyright 1994-1995 Jaba Development.
  5.                      (C) Copyright 1994-1995 Jan van den Baard.
  6.                      All Rights Reserved.
  7.  
  8. ------------------------------------------------------------------------------
  9.  
  10. TABLE OF CONTENTS
  11.  
  12. listviewclass/--background--
  13. listviewclass/Methods
  14. listviewclass/Attributes
  15.  
  16. listviewclass/--background--                      listviewclass/--background--
  17.  
  18.     NAME
  19.         Class:          listviewclass
  20.         Superclass:     baseclass
  21.         Include File:   <libraries/bgui.h>
  22.  
  23.     FUNCTION
  24.         To  provide   a  gadget  simular to the gadtools.library it's listview
  25.         kind.  The  lisview  class  does  how ever have extended functionality
  26.         like  hooks  for  entry  creation,  entry comparrison, entry and title
  27.         rendering.  Also  a  multi-selection mode is available. Opposed to the
  28.         gadtools  version  this  class does not require the usage  of list and
  29.         nodes.  All  kind  of  data  can  be  added to the listview as entries
  30.         providing that you supply hook routines to handle this data.
  31.  
  32.         Objects  from  this  class  send  out the following attribute pairs in
  33.         their notification events:
  34.  
  35.         GA_ID             - Gadget object ID.
  36.         LISTV_Entry       - Pointer to the selected entry.
  37.         LISTV_EntryNumber - Logical number of the selected entry.
  38.  
  39. listviewclass/Methods                                    listviewclass/Methods
  40.  
  41.     NOTE
  42.         Most  of  the  methods described below can also contain a pointer to a
  43.         GadgetInfo  structure.  This  pointer  does  not have to be valid. All
  44.         actions  will be done only if you want to let the action also be shown
  45.         visually  you  need to pass a valid pointer to a GadgetInfo structure.
  46.  
  47.     NEW METHODS
  48.         LVM_ADDENTRIES -- This  method  can be used to add more than one entry
  49.                 after  the  listview  object  has  been  created.  It uses the
  50.                 following custom message structure:
  51.  
  52.                 struct lvmAddEntries {
  53.                         ULONG              MethodID;  /* LVM_ADDENTRIES */
  54.                         struct GadgetInfo *lvmaGInfo; /* See note above. */
  55.                         APTR              *lvma_Entries;
  56.                         ULONG              lvma_How;
  57.                 };
  58.  
  59.                 lvma_Entries -- This  must point to a NULL-terminated array of
  60.                         pointers to the entries to add.
  61.  
  62.                 lvma_How -- Here  you  can select where the entries are added.
  63.                         The following positions are possible:
  64.  
  65.                         LVAP_HEAD -- The  entries  are added at the top of the
  66.                                 list.
  67.                         LVAP_TAIL -- The  entries  are  added at the bottom of
  68.                                 the list.
  69.                         LVAP_SORTED -- The entries  are added sorted according
  70.                                 to   the   sorting   method  active.   In  the
  71.                                 attributes  section  of this documentation you
  72.                                 can find more about the sorting possibilities.
  73.  
  74.                 This method returns TRUE uppon succes and FALSE if one or more
  75.                 of the entries failed to be added.
  76.  
  77.         LVM_ADDSINGLE -- This  method can be used to add a single entry to the
  78.                 listview  object  after  it  has  been  created.   It uses the
  79.                 following custom message structure:
  80.  
  81.                 struct lvmAddSingle {
  82.                         ULONG              MethodID;   /* LVM_ADDSINGLE */
  83.                         struct GadgetInfo *lvma_GInfo; /* See note above. */
  84.                         APTR               lvma_Entry;
  85.                         ULONG              lvma_How;
  86.                         ULONG              lvma_Flags;
  87.                 };
  88.  
  89.                 lvma_Entry -- This  must  point to the entry which needs to be
  90.                         added to the listview object.
  91.  
  92.                 lvma_How -- Please  refer  to  the  LVM_ADDENTRIES section for
  93.                         more information on the ways you can add entries.
  94.  
  95.                 lvma_Flags -- Any of the following flags can be set here:
  96.  
  97.                         LVASF_MAKEVISIBLE -- This tell's the lisview object to
  98.                                 scroll  the  list  to  make  the  added  entry
  99.                                 visible.
  100.                         LVASF_SELECT -- This  tell's  the  listview  object to
  101.                                 make the added entry selected. This  will also
  102.                                 automatically  scroll  the  list  to  make the
  103.                                 added entry visible.
  104.  
  105.                 Returns TRUE uppon success, FALSE uppon failure.
  106.  
  107.         LVM_CLEAR -- This  method must be used to clear and delete all entries
  108.                 present in the list.   It  uses  the  following custom message
  109.                 structure:
  110.  
  111.                 struct lvmCommand {
  112.                         ULONG              MethodID;   /* Several */
  113.                         struct GadgetInfo *lvmc_GInfo; /* See note above. */
  114.                 };
  115.  
  116.                 Return code is not defined.
  117.  
  118.         LVM_FIRSTENTRY, LVM_LASTENTRY, LVM_NEXTENTRY, LVM_PREVENTRY --   These
  119.                 methods must be used to itterate  through  all entries  in the
  120.                 listview.    All  these  methods  use  the  following  message
  121.                 structure:
  122.  
  123.                 struct lvmGetEntry {
  124.                         ULONG              MethodID;   /* Any of the above. */
  125.                         APTR               lvmg_Previous;
  126.                         ULONG              lvmg_Flags;
  127.                 };
  128.  
  129.                 lvmg_Previous -- For  the  LVM_FIRSTENTRY  and   LVM_LASTENTRY
  130.                         methods this must be NULL.   For the LVM_NEXTENTRY and
  131.                         LVM_PREVENTRY this should point to the  entry returned
  132.                         by a previous call to any of these methods.
  133.  
  134.                 lvmg_Flags -- Any of the following flags may be set here:
  135.  
  136.                         LVGEF_SELECTED -- The   methods  will  only  scan  for
  137.                                 selected entries when  this bit  is set.   All
  138.                                 non-selected entries will simply be skipped.
  139.  
  140.                 Returns a pointer  to  the  entry or NULL when no more entries
  141.                 are available.
  142.  
  143.                 Example:
  144.  
  145.                 /*
  146.                 **      Scan through all entries in
  147.                 **      the listview gadget starting
  148.                 **      at the first one.
  149.                 **/
  150.                 Object          *listview;
  151.                 APTR             entry;
  152.  
  153.                 /*
  154.                 **      Get first entry.
  155.                 **/
  156.                 if ( entry = (APTR)DoMethod(
  157.                                        listview, LVM_FIRSTENTRY, NULL, 0L )) {
  158.                         /*
  159.                         **      Loop through the rest of the list.
  160.                         **/
  161.                         do {
  162.                                 /*
  163.                                 **      Print the entry...
  164.                                 **/
  165.                                 printf( "Entry = %s\n", entry );
  166.                                 /*
  167.                                 **      Next entry...
  168.                                 **/
  169.                                 entry = (APTR)DoMethod(
  170.                                          listview, LVM_NEXTENTRY, entry, 0L );
  171.                         } while ( entry );
  172.                 }
  173.  
  174.         LVM_REMENTRY -- This method must be used to remove a single entry from
  175.                 the  listview  object.   It  uses the following custom message
  176.                 structure:
  177.  
  178.                 struct lvmRemEntry {
  179.                         ULONG              MethodID;   /* LVM_REMENTRY */
  180.                         struct GadgetInfo *lvmr_GInfo; /* See note above. */
  181.                         APTR               lvmr_Entry;
  182.                 };
  183.  
  184.                 lvmr_Entry -- This must point to the entry you want to remove.
  185.                         This usually is a pointer  returned  to you  by either
  186.                         the  LVM_FIRSTENTRY,  LVM_LASTENTRY,  LVM_NEXTENTRY or
  187.                         LVM_PREVENTRY method.
  188.  
  189.                 Return code is not defined.
  190.  
  191.         LVM_REFRESH -- This method must be used to refresh the listview object
  192.                 after some changes have been made which where not visible.  In
  193.                 some cases it might be usefull to add entries  without passing
  194.                 a GadgetInfo structure along  with the  adding  methods.  This
  195.                 will speed up the adding and you can show the changes when you
  196.                 are done by sending this method to the listview object.
  197.  
  198.                 This method uses the same custom message  structure as defined
  199.                 above at the LVM_CLEAR method.
  200.  
  201.                 Return code is not defined.
  202.  
  203.         LVM_SORT -- Calling  this  method  will force a complete re-sorting of
  204.                 the  entries  in  the  list.   This  can  be  handy  when your
  205.                 comparisson  hook (described  in the  Attributes  section) can
  206.                 handle different kinds of comparissons.
  207.  
  208.                 This method uses the same custom message  structure as defined
  209.                 above at the LVM_CLEAR method.
  210.  
  211.                 Return code is not defined.
  212.  
  213.         LVM_LOCKLIST, LVM_UNLOCKLIST --  These  methods  must  be used to lock
  214.                 or unlock the list contents.   When,  for  example,  you  must
  215.                 change the text of a list entry you should lock  it  using the
  216.                 LVM_LOCKLIST method and when you are done unlock it using  the
  217.                 LVM_UNLOCKLIST method.  This  locking is necessary  while  the
  218.                 list may get referenced while you are doing your changes.
  219.  
  220.                 Both  methods use the same custom message structure as defined
  221.                 above at the LVM_CLEAR method.
  222.  
  223.         LVM_MOVE ** V38 ** -- This  method must be used to move entries in the
  224.                 list. This method uses the following custom message structure:
  225.  
  226.                 struct lvmMove {
  227.                         ULONG              MethodID;       /* LVM_MOVE */
  228.                         struct GadgetInfo *lvmm_GInfo;     /* GadgetInfo */
  229.                         APTR               lvmm_Entry;
  230.                         ULONG              lvmm_Direction;
  231.                 };
  232.  
  233.                 lvmm_Entry -- This can point to the specific entry you want to
  234.                         move. If you specify NULL here the  selected  entry is
  235.                         moved.
  236.  
  237.                 lvmm_Direction -- Here you can specify the direction in  which
  238.                         the entry must be moved.  The following directions are
  239.                         possible:
  240.  
  241.                         LVMOVE_UP     -- Move the entry one place up.
  242.                         LVMOVE_DOWN   -- Move the entry one place down.
  243.                         LVMOVE_TOP    -- Move the entry to the list-top.
  244.                         LVMOVE_BOTTOM -- Move the entry to the list-bottom.
  245.  
  246.                 When the  entry  actually  moved the  class  will  send out  a
  247.                 notification message with the following attributes:
  248.  
  249.                         GA_ID             -- The ID of the object.
  250.                         LISTV_NewPosition -- The  new  numeric position of the
  251.                                 entry.
  252.  
  253.                 Returns TRUE when the entry moved and FALSE if not.
  254.  
  255.     CHANGED METHODS
  256.         None.
  257.  
  258. listviewclass/Attributes                              listviewclass/Attributes
  259.  
  260.     NAME
  261.         LISTV_ResourceHook -- ( struct Hook * )
  262.  
  263.     FUNCTION
  264.         To add a hook routine that will build or delete a listview entry.  The
  265.         hook routine will be called as follows:
  266.  
  267.         rc = hookFunc( hook, object, message );
  268.         D0             A0    A2      A1
  269.  
  270.         APTR             rc;
  271.         struct Hook     *hook;
  272.         Object          *object;
  273.         struct lvRender *message;
  274.  
  275.         The message arguments is a pointer to the following data structure:
  276.  
  277.         struct lvResource {
  278.                 UWORD           lvr_Command;
  279.                 APTR            lvr_Entry;
  280.         };
  281.  
  282.         lvr_Command -- This can be LVRC_MAKE which means that the  hook should
  283.                 create an entry or it can be  LVRC_KILL  which  means that the
  284.                 hook must dispose of a previously created entry.
  285.  
  286.         lvr_Entry -- When this is a LVRC_MAKE command  this contains  the data
  287.                 added  to  the  listview  by  one  of  the  adding  methods or
  288.                 attributes.  When  this  is a LVRC_KILL command this points to
  289.                 whatever LVRC_MAKE has created.
  290.  
  291.         The default creating/deletion that is done by the listview expects the
  292.         entries to be simple string pointers.   Internally these  strings  are
  293.         copied to an internal buffer when the entry is created. When the entry
  294.         is disposed of the string copy is simply  de-allocated.   If  you  add
  295.         entries to the listview which are not string pointers  you must supply
  296.         your own resource handling using this attribute.
  297.  
  298.         Example:
  299.  
  300.         /*
  301.         **      This example takes a PubScreenNode as input,
  302.         **      copies the name and adds that to the listview.
  303.         **      Uppon deletion it simply de-allocates the copy
  304.         **      of the string.
  305.         **/
  306.         __saveds __asm APTR
  307.         hookFunc( register __a0 struct Hook       *hook,
  308.                   register __a2 Object            *object,
  309.                   register __a1 struct lvResource *lvr )
  310.         {
  311.             struct PubScreenNode        *psn =
  312.                 ( struct PubScreenNode * )lvr->lvr_Entry;
  313.             UWORD                        len;
  314.             APTR                         rc = NULL;
  315.  
  316.             /*
  317.             **      Built or dispose?
  318.             **/
  319.             switch ( lvr->lvr_Command ) {
  320.                 case    LVRC_MAKE:
  321.                     /*
  322.                     **      Determine string size.
  323.                     **/
  324.                     len = strlen( psn->psn_Node.ln_name ) + 1;
  325.                     /*
  326.                     **      Allocate and copy the string.
  327.                     **/
  328.                     if ( rc = ( APTR )AllocVec( len, MEMF_ANY ))
  329.                         strcpy(( UBYTE * )rc, psn->psn_Node.ln_Name );
  330.                     break;
  331.  
  332.                 case    LVRC_KILL:
  333.                     /*
  334.                     **      Simply de-allocate whats created above.
  335.                     **/
  336.                     FreeVec( lvr->lvr_Entry );
  337.                     break;
  338.             }
  339.             /*
  340.             **      'rc' will be a pointer to the created
  341.             **      string copy or NULL which indicates a
  342.             **      memory error with LVRC_MAKE. If rc is non-NULL
  343.             **      the string is added to the list of entries.
  344.             **/
  345.             return( rc );
  346.         }
  347.  
  348.         The hook must return a pointer to the data created when the command is
  349.         LVRC_MAKE.  When  the  command  is  LVRC_MAKE and NULL is returned the
  350.         entry will not be added to the list.
  351.  
  352.         LVRC_KILL commands do not have a return code defined.
  353.  
  354.         Default is NULL (internal memory handling). Applicability is (I).
  355.  
  356.     SEE ALSO
  357.         LISTV_DisplayHook, LISTV_CompareHook
  358.  
  359.     NAME
  360.         LISTV_DisplayHook -- ( struct Hook * )
  361.  
  362.     FUNCTION
  363.         To add a hook routine that will take care of rendering the entries. In
  364.         some  cases  it  is  necessary  to do your own rendering. This hook is
  365.         called for each entry that needs to be rendered. The hook routine will
  366.         be called as follows:
  367.  
  368.         rc = hookFunc( hook, object, message );
  369.         D0             A0    A2      A1
  370.  
  371.         VOID             rc;     /* No return code defined. */
  372.         struct Hook     *hook;
  373.         Object          *object;
  374.         struct lvRender *message;
  375.  
  376.         The message argument is a pointer to the following data structure:
  377.  
  378.         struct lvRender {
  379.                 struct RastPort     *lvr_RPort;
  380.                 struct DrawInfo     *lvr_DrawInfo;
  381.                 struct Rectangle    *lvr_Bounds;
  382.                 APTR                 lvr_Entry;
  383.                 UWORD                lvr_State;
  384.                 UWORD                lvr_Flags;
  385.         };
  386.  
  387.         lvr_RPort -- This  is a pointer to the RastPort in which the rendering
  388.                 must be done. Please note that the font you must use to render
  389.                 text is already set up for you.  It  is  not  recommendable to
  390.                 use another font than the one set in this RastPort because the
  391.                 height of  the  area  you may render in is setup accoording to
  392.                 this font.
  393.  
  394.         lvr_DrawInfo -- This can point  to a  DrawInfo structure as defined in
  395.                 <intuition/screens.h> in which the necessay  information about
  396.                 the display environment is stored.  Note  that it  is possible
  397.                 that this is NULL. It is not very likely but it is possible.
  398.  
  399.         lvr_Bounds -- This is a struct Rectangle in  which the area you should
  400.                 render in is defined. Do _not_ render outside the given bounds
  401.                 or you will seriously screw up the display!  Also keep in mind
  402.                 that the area you are rendering into is not always cleared. In
  403.                 other words, the area may still show data from  another entry.
  404.                 You must make sure you completely re-render the given bounds.
  405.  
  406.         lvr_Entry -- This  points  to  the  entry  data  as setup by the entry
  407.                 creation hook or the built-in entry creation.
  408.  
  409.         lvr_State -- This  describes  the  state in which to render the entry.
  410.                 The state is one of the following possibilities:
  411.  
  412.                 LVRS_NORMAL -- Normal rendering. Render the entry in a normal,
  413.                         un-selected way.
  414.                 LVRS_SELECTED -- Selected rendering.  Render  the  entry  in a
  415.                         selected way.
  416.                 LVRS_NORMAL_DISABLED -- Normal, disabled rendering. Render the
  417.                         entry in a normal way but  make it  disabled.  This is
  418.                         normally  done  by  ghosting  it  with  a pattern (see
  419.                         below).
  420.                 LVRS_SELECTED_DISABLED -- Selected, disabled rendering. Render
  421.                         the entry is a selected way but make it disabled. This
  422.                         is normally done by ghosting  it with  a  pattern (see
  423.                         below).
  424.  
  425.                 Ghosting the entry is usually done like this:
  426.  
  427.                 struct lvRender         *lvr;
  428.                 UWORD                   *pens = lvr->lvr_DrawInfo->dri_Pens;
  429.                 UWORD                    patt = { 0x2222, 0x8888 };
  430.  
  431.                 SetAPen( lvr->lvr_RPort, pens[ SHADOWPEN ] );
  432.                 SetDrMd( lvr->lvr_RPort, JAM1 );
  433.                 SetAfPt( lvr->lvr_RPort, patt, 1 );
  434.  
  435.                 RectFill( lvr->lvr_RPort, lvr->lvr_Bounds.MinX,
  436.                                           lvr->lvr_Bounds.MinY,
  437.                                           lvr->lvr_Bounds.MaxX,
  438.                                           lvr->lvr_Bounds.MaxY );
  439.  
  440.                 Please keep in mind that, although the above code doesn't show
  441.                 it, the lvr_DrawInfo field can be NULL.
  442.  
  443.         lvr_Flags -- No flags are defined yet.
  444.  
  445.         When this hook is not set the internal rendering  routine will  simply
  446.         render a string which is created in  the  LIST_ResourceHook.  When the
  447.         LISTV_RenderHook routine creates something other than a  simple string
  448.         pointer you must provide a display hook to render the entries.
  449.  
  450.         Most  of  the  time  when  you  add  more  than a simple string to the
  451.         listview  object  the  data  you add is a structure which contains the
  452.         string  and  some  extra  data.  To prevent you from having to write a
  453.         display-hook  to  render the string your hook can also simply return a
  454.         pointer  to  the  string and the listviewclass will render it for you.
  455.         I.E.:
  456.  
  457.         struct myStruct {
  458.                 UBYTE           *string;
  459.                 UWORD            some_more_data;
  460.         };
  461.  
  462.         __saveds __asm hookFunc( register __a0 struct Hook     *hook,
  463.                                  register __a2 Object          *lv_obj,
  464.                                  register __a1 struct lvRender *lvr )
  465.         {
  466.              return((( struct myNode * )lvr->lvr_Entry )->string );
  467.         }
  468.  
  469.         This  hook  will  let the listviewclass dispatcher render the returned
  470.         string  for  you while keeping the extended data available for you. If
  471.         your  hook  returns  NULL  the listviewclass assumes you have done all
  472.         rendering required.
  473.  
  474.         Default is NULL (internal entry rendering). Applicability is (I).
  475.  
  476.     SEE ALSO
  477.         LISTV_ResourceHook, LISTV_CompareHook, LISTV_TitleHook
  478.  
  479.     NAME
  480.         LISTV_CompareHook -- ( struct Hook * )
  481.  
  482.     FUNCTION
  483.         To add a hook routine  that will  compare two  entries with eachother.
  484.         As it is possible  to have  entries  which are  different  from simple
  485.         strings you can perform your own comparison here.  The comparison hook
  486.         is called each time an entry is added  sorted or when  the list is re-
  487.         sorted. The hook routine will be called as follows:
  488.  
  489.         rc = hookFunc( hook, object, message );
  490.         D0             A0    A2      A1
  491.  
  492.         LONG                     rc;
  493.         struct Hook             *hook;
  494.         Object                  *object;
  495.         struct lvCompare        *message;
  496.  
  497.         The message argument is a pointer to the following data structure:
  498.  
  499.         struct lvCompare {
  500.                 APTR            lvc_EntryA;
  501.                 APTR            lvc_EntryB;
  502.         };
  503.  
  504.         lvc_EntryA, lvc_EntryB -- These  are the entries that must be compared
  505.                 to eachother.
  506.  
  507.         The internal comparison routine simple  does a  stricmp()  on the  two
  508.         entry strings.
  509.  
  510.         This hook must return -1 when entry a is smaller than entry b, 0  when
  511.         entry a is equal to entry b and 1 when entry a is bigger than entry b.
  512.  
  513.         Default is NULL (internal comparison routine). Applicability is (I).
  514.  
  515.     SEE ALSO
  516.         LISTV_ResourceHook, LISTV_DisplayHook
  517.  
  518.     NAME
  519.         LISTV_Top -- ( ULONG )
  520.  
  521.     FUNCTION
  522.         Set the top-entry of the visible part of the list. This tag is  mostly
  523.         used by the prop object that is connected to  the listview  but it can
  524.         also  be  controlled by your program. The data of this tag must be the
  525.         number of the node to set at the top of the visible area.
  526.  
  527.         Default is 0. Applicability is (ISGU).
  528.  
  529.     NAME
  530.         LISTV_ListFont -- ( struct TextAttr )
  531.  
  532.     FUNCTION
  533.         To set the font which is used to  render the  entries.  By default the
  534.         font  used  to  render  the  entries is the same font which is used to
  535.         render the object it's label. This font might be proportional. In some
  536.         cases  it might be useful to have a mono-space font for the entries or
  537.         even another proportional font.
  538.  
  539.         Default is NULL. Applicability is (IG)
  540.  
  541.     NAME
  542.         LISTV_ReadOnly -- ( BOOL )
  543.  
  544.     FUNCTION
  545.         To make the listview a read-only object.  Read only objects  have full
  546.         functionality except for the entries which cannot be selected.
  547.  
  548.         Default is FALSE. Applicability is (I).
  549.  
  550.     NAME
  551.         LISTV_MultiSelect -- ( BOOL )
  552.  
  553.     FUNCTION
  554.         To make the listview a multi-selection object. Multi-selection objects
  555.         allow the user to select more than one entry from the list.
  556.  
  557.         Default is FALSE. Applicability is (I).
  558.  
  559.     NAME
  560.         LISTV_EntryArray -- ( APTR * )
  561.  
  562.     FUNCTION
  563.         To add a set of entries at initialization time.  The data is a pointer
  564.         to a NULL-terminated array of entries which  need to  be added  to the
  565.         listview object.
  566.  
  567.         Default is NULL. Applicability is (I).
  568.  
  569.     SEE ALSO
  570.         LISTV_SortEntryArray
  571.  
  572.     NAME
  573.         LISTV_SortEntryArray -- ( BOOL )
  574.  
  575.     FUNCTION
  576.         To  sort  the  entries  added  at  object  create time. By default the
  577.         entries  added  with  the LISTV_EntryArray attribute will ocure in the
  578.         list in the same order as they ocure in the array. When this attribute
  579.         is set to TRUE these entries will be sorted.
  580.  
  581.         Default is FALSE. Applicability is (I).
  582.  
  583.     SEE ALSO
  584.         LISTV_EntryArray
  585.  
  586.     NAME
  587.         LISTV_Select -- ( ULONG )
  588.  
  589.     FUNCTION
  590.         To select an entry in the list. The entry you select will also be made
  591.         visible   in   the   display   area.  The data required is the logical
  592.         number of the entry in the list starting with 0 as the first entry.
  593.  
  594.         The following magic numbers are allowed in the tag it's data field:
  595.  
  596.         LISTV_Select_First    -- Select the first entry. ** V38 **
  597.  
  598.         LISTV_Select_Last     -- Select the last entry. ** V38 **
  599.  
  600.         LISTV_Select_Next     -- Select the next  entry.  If there is no entry
  601.                 selected yet the first visible entry is selected. ** V38 **
  602.  
  603.         LISTV_Select_Previous -- Select  the  previous entry.   If there is no
  604.                 selected  entry  yet  the  first  visible  entry  is selected.
  605.                 ** V38 **
  606.  
  607.         LISTV_Select_Top      -- Select the first visible entry. ** V38 **
  608.  
  609.         LISTV_Select_Page_Up  -- Select the entry one page above  the current.
  610.                 If the currently selected entry is not the  top-entry  the top
  611.                 entry will be selected. Otherwise the entry one-page up  minus
  612.                 one is selected. When no entry is selected the  first  visible
  613.                 entry is selected. ** V38 **
  614.  
  615.         LISTV_Select_Page_Down -- Select the entry one page below the current.
  616.                 If the currently selected entry is not the   bottom-entry  the
  617.                 bottom entry will be selected.  Otherwise  the  entry one-page
  618.                 down minus one is selected.  When  no  entry  is  selected the
  619.                 first visible entry is selected. ** V38 **
  620.  
  621.         Applicability is (SU).
  622.  
  623.     NAME
  624.         LISTV_MakeVisible -- ( ULONG )
  625.  
  626.     FUNCTION
  627.         To scroll the list to make the entry appear in the display area of the
  628.         listview object. The data required is the logical number of  the entry
  629.         in the list starting with 0 as the first entry.
  630.  
  631.         Applicability is (SU).
  632.  
  633.     NAME
  634.         LISTV_Entry -- ( APTR )
  635.  
  636.     FUNCTION
  637.         This  tag  is sent during notification. The data field is a pointer to
  638.         the entry which triggered the notification.
  639.  
  640.         Applicability is (N).
  641.  
  642.     SEE ALSO
  643.         LISTV_EntryNumber
  644.  
  645.     NAME
  646.         LISTV_EntryNumber -- ( ULONG )
  647.  
  648.     FUNCTION
  649.         This  tag  is  sent during notification. The data field is the logical
  650.         number of the entry which triggered the notification.
  651.  
  652.         Applicability is (N).
  653.  
  654.     SEE ALSO
  655.         LISTV_Entry
  656.  
  657.     NAME
  658.         LISTV_LastClicked -- ( APTR )
  659.  
  660.     FUNCTION
  661.         To get a pointer to the last selected entry.  This data can be used to
  662.         detect double-clicking and entry.
  663.  
  664.         Example:
  665.  
  666.         Object          *listview;
  667.         ULONG            ds[2], dm[2], last = 0, clicked;
  668.  
  669.         GetAttr( LISTV_LastClicked, listview, &clicked );
  670.         if ( clicked == last ) {
  671.                 CurrentTime( &ds[ 1 ], &dm[ 1 ] );
  672.                 if ( DoubleClick( ds[ 0 ], dm[ 0 ], ds[ 1 ], dm [ 1 ] )) {
  673.                         /* Double clicked */
  674.                         ...
  675.                 }
  676.         }
  677.         CurrentTime( &ds[ 0 ], &dm[ 0 ] );
  678.         last = clicked;
  679.  
  680.         Applicability is (G).
  681.  
  682.     SEE ALSO
  683.         LISTV_LastClickedNum
  684.  
  685.     NAME
  686.         LISTV_TitleHook -- ( struct Hook * )
  687.  
  688.     FUNCTION
  689.         To  add  a hook to render a title for the list. Multi-column listviews
  690.         normally  have  a  title  entry which is rendered in the list area but
  691.         does  not scroll with the list. To support multi-column listviews this
  692.         hook can be defined which will keep room for a single entry at the top
  693.         of the list area which is reserved for this purpose.  The hook routine
  694.         is  called  exactly the same as the LISTV_DisplayHook routine with the
  695.         exception  that  the  lvr_Entry  field  of the lvRender structure will
  696.         contain a NULL pointer.
  697.  
  698.         Default is NULL (no title). Applicability is (I).
  699.  
  700.     NAME
  701.         LISTV_ThinFrames -- ( BOOL )
  702.  
  703.     FUNCTION
  704.         To make  all  listview object framing appear as thin frames. This will
  705.         help you to make an aspect-ratio dependant GUI.
  706.  
  707.         Default is FALSE. Applicability is (I).
  708.  
  709.     NAME
  710.         PGA_NewLook -- ( BOOL )
  711.  
  712.     FUNCTION
  713.         To make the scroller of the listview gadget appear in the new look.
  714.  
  715.         Default is FALSE. Applicability is (I).
  716.  
  717.     NAME
  718.         LISTV_LastClickedNum -- ( ULONG ) ** V38 **
  719.  
  720.     FUNCTION
  721.         To return the number of the last selected entry.
  722.  
  723.         Applicability is (G).
  724.  
  725.     SEE ALSO
  726.         LISTV_LastClicked
  727.  
  728.     NAME
  729.         LISTV_NumEntries ( ULONG ) ** V38 **
  730.  
  731.     FUNCTION
  732.         To return the number of entries in the list.
  733.  
  734.         Applicability is (G).
  735.  
  736.     NAME
  737.         LISTV_NewPosition -- ( ULONG ) ** V38 **
  738.  
  739.     FUNCTION
  740.         To  notify  the  object  it's  targets  of the entry it's new position
  741.         number.   When  you  move an entry with the LVM_MOVE method the object
  742.         will send out a notification message with this attribute.
  743.  
  744.         Applicability is (N).
  745.  
  746.     SEE ALSO
  747.         LVM_MOVE
  748.  
  749.     NAME
  750.         LISTV_MinEntriesShown -- ( UWORD )
  751.  
  752.     FUNCTION
  753.         To specify how many entries should be visible at all times.  Note: The
  754.         larger this value the bigger the object it's minimum size.
  755.  
  756.         Default is 3. Applicability is (I).
  757.